package com.example.demo3.Controller;


import com.example.demo3.Entity.ClassInfo;
import com.example.demo3.Service.ClassInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("cls")
public class ClassInfoController {
    @Autowired
    private ClassInfoService classInfoService;

    //http://localhost:8080/cls/list
    @GetMapping("list")
    public List<ClassInfo> queryAllClassInfolist() {
        return classInfoService.getClassInfo();
    }
    //我是罗桦阳
    @GetMapping("list1")
    public List<ClassInfo> queryAllClassInfolist() {
        return classInfoService.getClassInfo();
    }
}
